Repository navigation
Close MockWebServer connections on failure - #9875
Merged
yschimke merged 3 commits intoNov 21, 2026
Merged
Conversation
FletchMcKee
force-pushed
the
close-mws-connections-on-fail
branch
from
November 20, 2026 16:31
f990191 to
6f50a90
Compare
Contributor
Author
|
Realized it might be helpful to link to those workflows. Here is where it completes after closing the connections: https://github.com/FletchMcKee/okhttp/actions/runs/44563014825 And one of the long workflows: https://github.com/FletchMcKee/okhttp/actions/runs/44551265593 |
yschimke
approved these changes
Nov 21, 2026
yschimke
enabled auto-merge (squash)
November 21, 2026 12:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MockWebServer's
serveConnectionleft the socket open ifhandle()threw which would leave the client hanging until it timed out.I was trying to see if I could help with the
openjdk8alpnfailures and discovered this. In my fork I moved thejdk8alpnGradle logic totesting-conventionsand it ended up with a lot of slow tests. Most had an unhelpful summary like this:But an error output like this:
I can share those test reports if desired. Before this change the reports would be incomplete since I canceled the jobs as they were still running after an hour. With this change they completed in ~13 minutes with 700+ test failures, but most were NoSuchMethodErrors or NoSuchFieldErrors.
I haven't figured out the fix for that, but I thought this might still be helpful.